window.addEventListener("DOMContentLoaded", () => {
  document
    .querySelector("#tree")
    .querySelectorAll(".title")
    .forEach((li) => {
      li.addEventListener("click", () => {
        li.querySelector(":scope> .title-icon").classList.toggle("tree-down");
        li.parentElement
          .querySelector(":scope > .tree-node")
          .classList.toggle("tree-down");
      });
    });
});
